package com.woniu;

import com.woniu.pojo.Shop;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "car-shop",path = "/shop")
public interface ShopFeignClient {

    @ApiOperation("修改")
    @PutMapping
    public Result<String> updateShop(@RequestBody Shop shop);

    @ApiOperation("通过id查找")
    @GetMapping("/{id}")
    public Result<Shop> getById(@PathVariable("id") Integer id);

    @ApiOperation("通过userId查询")
    @GetMapping("/user/{userId}")
    public Result<Integer> getShopId(@PathVariable("userId") Integer userId);
}
